package com.apes.hr.base.model;

import com.apes.framework.jpa.DefaultPersistListener;
import com.apes.framework.jpa.Model;
import com.apes.framework.jpa.Name;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SelectBeforeUpdate;

import javax.persistence.*;

/**
 * 功能：技能证书类型
 * @author HuJianlin
 * @create 2018-04-25 15:11
 */
@Getter
@Setter
@SelectBeforeUpdate
@DynamicInsert
@DynamicUpdate
@Entity
@EntityListeners(DefaultPersistListener.class)
@Table(name = "hr_skill_type")
public class SkillType extends Model {

    @Id
    @Column(name = "id", nullable = false, length = 16)
    private String id; //类型编码

    @Name
    @Column(name = "name", nullable = true, length = 50)
    private String name; //类型名称

    @Column(name = "valid", nullable = true, columnDefinition = "number(1,0) default 1")
    private boolean valid = true; //有效

}
